package com.panasonic.web.model;

import com.panasonic.web.domain.cms.CmsCategory;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @className: CategoryTree
 * @description: TODO 类描述
 * @author: laiweifeng
 * @date: 2021/11/14
 **/
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class TreeModel {


    public TreeModel(CmsCategory category) {

        this.id = category.getCategoryId();
        this.name = category.getCategoryName();
        this.sort = category.getSort();
        this.type = category.getType();

    }

    private Long id;


    private String name;


    private Integer sort;

    private int type;
    /**
     * 父菜单ID
     */
    private Long parentId;

    private List<TreeModel> children;
}
